//
//  PlaySectonOneCell.m
//  FoodList
//
//  Created by Jason on 16/4/14.
//  Copyright © 2016年 王金晶. All rights reserved.
//

#import "PlaySectonOneCell.h"

@implementation PlaySectonOneCell

- (void)setSection1Model:(PlaySectionOneModel *)section1Model {
    _section1Model = section1Model;
    [self.coverImg sd_setImageWithURL:[NSURL URLWithString:section1Model.coverMiddle]];
    self.titleLab.font = [UIFont systemFontOfSize:returnFont(Height) + 1];
    self.titleLab.text = section1Model.title;
    self.introLab.font = [UIFont systemFontOfSize:returnFont(Height) - 1];
    self.introLab.text = section1Model.intro;
    NSNumber *tempPlay = section1Model.albumPlays[[NSString stringWithFormat:@"%@", section1Model.albumId]];
    NSString *playStr = [NSString stringWithFormat:@"%@", tempPlay];
    NSInteger playCount = [tempPlay integerValue];
    
    if (playStr.length >= 5) {
        self.playCountLab.text = [NSString stringWithFormat:@"%ld.%ld万", playCount / 10000, (playCount % 10000) / 1000];
    }else {
        self.playCountLab.text = [NSString stringWithFormat:@"%ld", playCount];
    }
    self.playCountLab.font = [UIFont systemFontOfSize:returnFont(Height) - 4];
    NSNumber *tempTrack = section1Model.albumTracks[[NSString stringWithFormat:@"%@", section1Model.albumId]];
    self.allMenuLab.font = [UIFont systemFontOfSize:returnFont(Height) - 4];
    self.allMenuLab.text = [NSString stringWithFormat:@"%@集", tempTrack];
    
}


- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
